home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_11
/
phillip2
/
ilabel.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-24
|
25KB
|
613 lines
/************************************************
*
* file d:\cips\ilabel.c
*
* Functions: This file contains
* main
*
* Purpose:
* This program writes simple block letters
* the an image file. You can use these
* as labels for other images.
*
* External Calls:
* wtiff.c - create_allocate_tiff_file
* read_tiff_image
* gpcips.c - my_clear_text_screen
*
* Modifications:
* 21 May 1993 - created
*
*************************************************/
#include "cips.h"
#define R 9
#define C 7
#define COUNTER_LIMIT 8
#define IE_START 7
#define VAL 200
short image[ROWS][COLS];
/******************************
*
* Define all the 9x7 arrays
* that contain the characters.
*
*******************************/
short aperiod[R][C] = {
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0,VAL,VAL, 0, 0, 0},
{ 0, 0,VAL,VAL, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0}};
short acomma[R][C] = {
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0,VAL,VAL, 0, 0, 0},
{ 0, 0,VAL,VAL, 0, 0, 0},
{ 0, 0, 0,VAL, 0, 0, 0}};
short aexclam[R][C] = {
{ 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0,VAL, 0, 0, 0},
{ 0, 0, 0,VAL, 0, 0, 0},
{ 0, 0, 0,VAL, 0, 0, 0},
{ 0, 0, 0,VAL, 0, 0, 0},
{ 0, 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